from player import Player
from equipment import Equipment
from item import Item
from pocket import Bag
import unittest
class TestBag(unittest.TestCase):
    def setUp(self):
        self.ppl=Player(mhp=20,hp=19)
        self.newbag=Bag()
        self.drug=Item(hp=10)
        self.weapon=Equipment(atk=2)
    def test_Bag(self):
        self.assertEqual(self.newbag.addItem(self.ppl),False)
        self.assertEqual(self.newbag.drop(self.ppl),False)
        self.assertEqual(self.newbag.addItem(self.drug),True)
        self.assertEqual(self.newbag.addItem(self.drug),True)
        self.assertEqual(self.newbag.addItem(self.drug),True)
        self.assertEqual(self.newbag.addItem(self.drug),True)
        self.assertEqual(self.newbag.addItem(self.drug),True)
        self.assertEqual(self.newbag.addItem(self.drug),True)
        self.assertEqual(self.newbag.addItem(self.drug),True)
        self.assertEqual(self.newbag.addItem(self.weapon),True)
        self.assertEqual(self.newbag.addItem(self.weapon),True)
        self.assertEqual(self.newbag.addItem(self.weapon),True)
        self.assertEqual(self.newbag.addItem(self.weapon),False)
        self.assertEqual(self.newbag.addItem(self.weapon),False)
        self.assertEqual(self.newbag.drop(self.weapon),True)
if __name__ == '__main__':
    unittest.main()
